package com.echoesnet.echoesshortvideo.Beans;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author yqh
 * @Date 2018/4/24
 * @Version 1.0
 */
public class Video implements Parcelable
{

    private String commentNum;//评论数量
    private String content;//视频文字内容
    private Extra4Video extra;//扩展信息
    private String followOrNot;//0未关注，1已关注
    private String likeNum;//点赞数量
    private String likeOrNot;//0未点赞，1点赞
    private String location;//位置描述
    private String posx;//坐标信息
    private String posy;//坐标信息
    private RelatedUser4Video relatedUser;//@用户id":"@用户昵称
    private String shareNum;//分享次数
    private String showType;//横屏竖屏
    private String thumbnails;//缩略图
    private String timeToNow;//发布时间
    private String url;//视频地址
    private String videoId;//视频id
    private String userId;//视频发布者
    private String nickName;//用户名
    private String headPic;//头像

    private boolean isVideoPause = true;

    public boolean isVideoPause()
    {
        return isVideoPause;
    }

    public void setVideoPause(boolean videoPause)
    {
        isVideoPause = videoPause;
    }

    public String getCommentNum()
    {
        return commentNum;
    }

    public void setCommentNum(String commentNum)
    {
        this.commentNum = commentNum;
    }

    public String getContent()
    {
        return content;
    }

    public void setContent(String content)
    {
        this.content = content;
    }


    public String getFollowOrNot()
    {
        return followOrNot;
    }

    public void setFollowOrNot(String followOrNot)
    {
        this.followOrNot = followOrNot;
    }

    public String getLikeNum()
    {
        return likeNum;
    }

    public void setLikeNum(String likeNum)
    {
        this.likeNum = likeNum;
    }

    public String getLikeOrNot()
    {
        return likeOrNot;
    }

    public void setLikeOrNot(String likeOrNot)
    {
        this.likeOrNot = likeOrNot;
    }

    public String getLocation()
    {
        return location;
    }

    public void setLocation(String location)
    {
        this.location = location;
    }

    public String getPosx()
    {
        return posx;
    }

    public void setPosx(String posx)
    {
        this.posx = posx;
    }

    public String getPosy()
    {
        return posy;
    }

    public void setPosy(String posy)
    {
        this.posy = posy;
    }

    public String getShareNum()
    {
        return shareNum;
    }

    public void setShareNum(String shareNum)
    {
        this.shareNum = shareNum;
    }

    public String getShowType()
    {
        return showType;
    }

    public void setShowType(String showType)
    {
        this.showType = showType;
    }

    public String getThumbnails()
    {
        return thumbnails;
    }

    public void setThumbnails(String thumbnails)
    {
        this.thumbnails = thumbnails;
    }

    public String getTimeToNow()
    {
        return timeToNow;
    }

    public void setTimeToNow(String timeToNow)
    {
        this.timeToNow = timeToNow;
    }

    public String getUrl()
    {
        return url;
    }

    public void setUrl(String url)
    {
        this.url = url;
    }

    public String getVideoId()
    {
        return videoId;
    }

    public void setVideoId(String videoId)
    {
        this.videoId = videoId;
    }

    public String getUserId()
    {
        return userId;
    }

    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public String getHeadPic()
    {
        return headPic;
    }

    public void setHeadPic(String headPic)
    {
        this.headPic = headPic;
    }

    public String getNickName()
    {
        return nickName;
    }

    public void setNickName(String nickName)
    {
        this.nickName = nickName;
    }

    public Extra4Video getExtra()
    {
        return extra;
    }

    public void setExtra(Extra4Video extra)
    {
        this.extra = extra;
    }

    public RelatedUser4Video getRelatedUser()
    {
        return relatedUser;
    }

    public void setRelatedUser(RelatedUser4Video relatedUser)
    {
        this.relatedUser = relatedUser;
    }

    @Override
    public String toString()
    {
        return "Video{" +
                "commentNum='" + commentNum + '\'' +
                ", content='" + content + '\'' +
                ", extra=" + extra +
                ", followOrNot='" + followOrNot + '\'' +
                ", likeNum='" + likeNum + '\'' +
                ", likeOrNot='" + likeOrNot + '\'' +
                ", location='" + location + '\'' +
                ", posx='" + posx + '\'' +
                ", posy='" + posy + '\'' +
                ", relatedUser=" + relatedUser +
                ", shareNum='" + shareNum + '\'' +
                ", showType='" + showType + '\'' +
                ", thumbnails='" + thumbnails + '\'' +
                ", timeToNow='" + timeToNow + '\'' +
                ", url='" + url + '\'' +
                ", videoId='" + videoId + '\'' +
                ", userId='" + userId + '\'' +
                ", nickName='" + nickName + '\'' +
                ", headPic='" + headPic + '\'' +
                ", isVideoPause=" + isVideoPause +
                '}';
    }

    @Override
    public int describeContents()
    {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags)
    {
        dest.writeString(this.commentNum);
        dest.writeString(this.content);
        dest.writeParcelable(this.extra, flags);
        dest.writeString(this.followOrNot);
        dest.writeString(this.likeNum);
        dest.writeString(this.likeOrNot);
        dest.writeString(this.location);
        dest.writeString(this.posx);
        dest.writeString(this.posy);
        dest.writeParcelable(this.relatedUser, flags);
        dest.writeString(this.shareNum);
        dest.writeString(this.showType);
        dest.writeString(this.thumbnails);
        dest.writeString(this.timeToNow);
        dest.writeString(this.url);
        dest.writeString(this.videoId);
        dest.writeString(this.userId);
        dest.writeString(this.nickName);
        dest.writeString(this.headPic);
    }

    public Video()
    {
    }

    protected Video(Parcel in)
    {
        this.commentNum = in.readString();
        this.content = in.readString();
        this.extra = in.readParcelable(Extra4Video.class.getClassLoader());
        this.followOrNot = in.readString();
        this.likeNum = in.readString();
        this.likeOrNot = in.readString();
        this.location = in.readString();
        this.posx = in.readString();
        this.posy = in.readString();
        this.relatedUser = in.readParcelable(RelatedUser4Video.class.getClassLoader());
        this.shareNum = in.readString();
        this.showType = in.readString();
        this.thumbnails = in.readString();
        this.timeToNow = in.readString();
        this.url = in.readString();
        this.videoId = in.readString();
        this.userId = in.readString();
        this.nickName = in.readString();
        this.headPic = in.readString();
    }

    public static final Parcelable.Creator<Video> CREATOR = new Parcelable.Creator<Video>()
    {
        @Override
        public Video createFromParcel(Parcel source)
        {
            return new Video(source);
        }

        @Override
        public Video[] newArray(int size)
        {
            return new Video[size];
        }
    };


    @Override
    public boolean equals(Object o)
    {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Video video = (Video) o;
        return videoId.equals(video.videoId);
    }

    @Override
    public int hashCode()
    {
        return videoId.hashCode();
    }
}
